from connect_wifi import *
from authenticate import *

if __name__ == '__main__':
    # 连接wifi的配置
    wifi_profile = {
        "SSID": "NCUWLAN",
        "AUTH": const.AUTH_ALG_OPEN,
        "AKM": const.AKM_TYPE_NONE,
        "CIPHER": const.CIPHER_TYPE_NONE,
        "KEY": ""
    }
    # 用户认证的配置
    auth_profile = {
        "username": "8002119319",
        "password": "Wjh%12345"
    }
    # 连接校园wifi
    print("正在连接wifi,请稍等...")
    net_connect(wifi_profile)
    print("wifi连接成功...")
    # 用户认证登录
    print("正在进行用户验证登录,请稍等...")
    authenticate(auth_profile)
    print("认证成功,你可以愉快的上网了...")
    quit()
